#ifndef __OLA_TIMER_H__
#define __OLA_TIMER_H__

#include <stddef.h>
#include <sys/times.h>
#include "ola_stdint.h"


#define TIME_SYNC_PERIOD    (60 * SECONDS)

typedef struct {
    uint32_t second;
    uint32_t ms;
} ola_pal_time_stamp_t;

/**
 * set utc timestamp
 * @param[in] time_stamp_ms : timestamp(ms)
 * @return: success or fail
 *
 */
int32_t ola_pal_set_UTCtime(ola_pal_time_stamp_t ts);

/**
* @brief get timestamp(ms)
* @param none
* @return time ms
*/
int ola_pal_get_time_msec(ola_pal_time_stamp_t *ts);

/**
 * get timestamp(ms)
 *
 * @return: UTC Second
 *
 */
uint32_t ola_pal_get_time_second(uint32_t *ola_pal_time);

/**
 * get time string
 *
 * @out param: "year-month-day hour:minute:second"
 * @return: success or fail
 *
 */
char *ola_pal_get_time_str(void);

/**
 * get os time
 *
 * @out param: none
 * @return: sys time ticks ms since sys start
*/

uint32_t ola_pal_get_os_time(void);

#endif



